

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="layout" content="main" />
<g:set var="entityName"
	value="${message(code: 'task.label', default: 'Task')}" />
<title><g:message code="default.show.label" args="[entityName]" /></title>
</head>
<body>
<div class="nav"><span class="menuButton"><a class="home"
	href="${createLink(uri: '/')}">Home</a></span> <span class="menuButton"><g:link
	class="list" action="list">
	<g:message code="default.list.label" args="[entityName]" />
</g:link></span> <g:ifAllGranted role="ROLE_ADMIN">
	<span class="menuButton"><g:link class="create" action="create">
		<g:message code="default.new.label" args="[entityName]" />
	</g:link></span>
</g:ifAllGranted></div>
<div class="body">
<h1><g:message code="default.show.label" args="[entityName]" /></h1>
<g:if test="${flash.message}">
	<div class="message">
	${flash.message}
	</div>
</g:if>
<div class="dialog">
<table>
	<tbody>

		<tr class="prop">
			<td valign="top" class="name"><g:message
				code="task.project.label" default="Project" /></td>

			<td valign="top" class="value"><g:link controller="project"
				action="show" id="${taskInstance?.project?.id}">
				${taskInstance?.project?.name.encodeAsHTML()}
			</g:link></td>

		</tr>

		<tr class="prop">
			<td valign="top" class="name"><g:message code="task.name.label"
				default="Name" /></td>

			<td valign="top" class="value">
			${fieldValue(bean: taskInstance, field: "name")}
			</td>

		</tr>

		<tr class="prop">
			<td valign="top" class="name"><g:message
				code="task.description.label" default="Description" /></td>

			<td valign="top" class="value">
			${fieldValue(bean: taskInstance, field: "description")}
			</td>

		</tr>

		<tr class="prop">
			<td valign="top" class="name"><g:message
				code="task.startDate.label" default="Start Date" /></td>

			<td valign="top" class="value"><g:formatDate
				date="${taskInstance?.startDate}" /></td>

		</tr>

		<tr class="prop">
			<td valign="top" class="name"><g:message
				code="task.endDate.label" default="Due Date" /></td>

			<td valign="top" class="value"><g:formatDate
				date="${taskInstance?.endDate}" /></td>

		</tr>

		<tr class="prop">
			<td valign="top" class="name"><g:message
				code="task.endPlanDate.label" default="Final Date" /></td>

			<td valign="top" class="value"><g:formatDate
				date="${taskInstance?.endPlanDate}" /></td>

		</tr>

		<tr class="prop">
			<td valign="top" class="name"><g:message code="task.hours.label"
				default="Hours" /></td>

			<td valign="top" class="value">
			${fieldValue(bean: taskInstance, field: "hours")}
			</td>

		</tr>

		<tr class="prop">
			<td valign="top" class="name"><g:message
				code="task.subTasks.label" default="Sub Tasks" /></td>

			<td valign="top" style="text-align: left;" class="value">
			<ul>
				<g:each in="${taskInstance.subTasks}" var="s">
					<li><g:link controller="subTask" action="show" id="${s.id}">
						${s?.phaseName.encodeAsHTML()}
					</g:link></li>
				</g:each>
			</ul>
			</td>

		</tr>

	</tbody>
</table>
</div>
<g:ifAllGranted role="ROLE_ADMIN">
	<div class="buttons"><g:form>
		<g:hiddenField name="id" value="${taskInstance?.id}" />
		<span class="button"><g:actionSubmit class="edit" action="edit"
			value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
		<span class="button"><g:actionSubmit class="delete"
			action="delete"
			value="${message(code: 'default.button.delete.label', default: 'Delete')}"
			onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
	</g:form></div>
</g:ifAllGranted></div>
</body>
</html>
